/** @type {import('next').NextConfig} */
import path from 'path'

const nextConfig = {
  webpack: (config) => {
    // Ignore node-specific modules when bundling for the browser
    // https://webpack.js.org/configuration/resolve/#resolvealias
    config.resolve.alias = {
      ...config.resolve.alias,
      sharp$: false,
      'onnxruntime-node$': false,
    }
    return config
  },
  sassOptions: {
    includePaths: [path.dirname(path.resolve(import.meta.url))],
  },
}

export default nextConfig
